package com.hutou.chuangke.uitl;

import android.app.Activity;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.Display;

/**
 * Created by o on 2017/4/5.
 */
public class ScreenUtils {
    public static int geiWindowWith(Context context){
        Display d = ((Activity) context).getWindowManager().getDefaultDisplay();
        int width = d.getWidth();   //得到宽度
        return width;
    }

    public static int geiWindowheigth(Context context){
        Display d = ((Activity) context).getWindowManager().getDefaultDisplay();
        int width = d.getHeight();   //得到宽度
        return width;
    }
}
